UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mlu3CQfqvaC3mwRbvg5ErnsgW+T2X5UIMa5YI/h+XVE='
WHERE
key_id = '933c353e989b8562c91de788485aa700282c4053a2029fb757ce86490f2e1d6e'
AND (
token = 'Mlu3CQfqvaC3mwRbvg5ErnsgW+T2X5UIMa5YI/h+XVE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)