UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ad+kYmvRugNJ8U5cnJpk5VVFqKgZW/V/LvlzfFRgwlU='
WHERE
key_id = '6cd93971afb4f1f37c1fea89318b6fd94f5c67ae0cd6b14e1b0f4bfdfd930921'
AND (
token = 'Ad+kYmvRugNJ8U5cnJpk5VVFqKgZW/V/LvlzfFRgwlU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)