UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e5FvYWR/lR+ulXDfLipYc9RpxroFF93v3PuoTetttig='
WHERE
key_id = '375d425130af4758c599d9cc831f20a093cea7a8ee42a04b1ced7ccbe780379d'
AND (
token = 'e5FvYWR/lR+ulXDfLipYc9RpxroFF93v3PuoTetttig='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)